package controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import pojo.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.UUID;

/**
 * @author jesse
 * @Date 2019/5/28 14:37
 * @Version 1.0
 */
@Controller
public class HomeController {
    @RequestMapping("/demo")
    public String home(HttpSession session){

        User user1 = (User)session.getAttribute("USER_SESSION");
        System.out.println("user1=" + user1);
        if(user1 == null){
            return "/WEB-INF/view/signin/signin.html";
        }else{
            return "redirect:/demo/SysM/admin";
        }
    }


}
